import { defineComponent, provide, ref } from 'vue';
import { provideKey } from '@/pages/basic-vue/keys';

export default defineComponent({
  name: 'Test',
  setup() {
    const count = ref(0);
    provide(provideKey, count);
    const increment = () => {
      count.value++;
    };
    return {
      count,
      increment,
    };
  },
  render() {
    return (
      <div>
        <h1>Test Page</h1>
        <p>Count: {this.count}</p>
        <button onClick={this.increment}>Increment</button>
      </div>
    );
  },
});
